{{template "base/base.html" .}}
{{template "base/base_common.html" .}}
{{define "meta"}}<title>{{i18n .Lang "auth.change_password"}} - {{i18n .Lang "app_name"}}</title>{{end}}
{{define "body"}}
<div class="row">
    <div id="content">
        <div class="col-md-3">
            <div class="box">
                <ul class="nav nav-side">
                    <li class="cell first">
                        <h4 class="head"><i class="icon icon-cogs"></i> {{i18n .Lang "auth.user_settings"}}</h4>
                    </li>
                    <li>
                        <a href="{{.AppUrl}}settings/profile">{{i18n .Lang "auth.user_profile"}}</a>
                    </li>
                    <li>
                        <a href="{{.AppUrl}}settings/avatar">{{i18n .Lang "auth.user_avatar"}}</a>
                    </li>
                     <li class="active">
                        <a href="{{.AppUrl}}settings/change/password">{{i18n .Lang "auth.change_password"}}</a>
                    </li>
                    <li class="cell last">
                    </li>
                </ul>
            </div>
    	</div>
        <div class="col-md-9">
            <div class="box">
                <ol class="breadcrumb">
                    <li><a href="{{.AppUrl}}"><span class="glyphicon glyphicon-home"></a></li>
                    <li><a href="">{{i18n .Lang "auth.change_password"}}</a></li>
                </ol>
                <div class="">
                    {{if .flash.NeedActive}}
                    <div class="alert alert-info">
                        <h4>{{i18n .Lang "auth.need_active"}}</h4>
                        {{i18n .Lang "auth.need_active_message"}}
                    </div>
                    {{else if .flash.PasswordSave}}
                    <div class="alert alert-success">
                        {{i18n .Lang "auth.password_changed"}}
                    </div>
                    {{end}}
                    <h3 class="underline">{{i18n .Lang "auth.change_password"}}</h3>
                    <div class="row">
                        <div class="col-md-6">
                            <form method="POST" action="{{.AppUrl}}settings/change/password">
                                {{.xsrf_html}}{{.once_html}}

                                {{template "base/form/fields.html" .PasswordFormSets}}

                                <div class="form-group">
                                    <button type="submit" class="btn btn-primary">{{i18n .Lang "auth.change_password"}} <span class="glyphicon glyphicon-circle-arrow-right"></span></i></button>
                                </div>
                            </form>
                        </div>
                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
        </div>
	</div>
</div>
{{end}}